In 3D computer graphics, a depth map is an image or image channel that contains information relating to the distance of the surfaces of scene objects from a viewpoint. Various methods are generally known for determining a depth map. For example, Time of fly (TOF) is known in the art for measuring a distance of an object with respect to a reference point by emitting light beams towards an object. Typically, under TOF, a light may be emitted towards the object at t1 and the returned light (due reflection off the object) can be captured at time t2. The time difference between t1 and t2 can be calculated. Because the speed of light is known, the distance of the object with respect to the reference point can be known based on time difference. However, a drawback associated with TOF for determining an object distance is that a single light can be used to measure the distance of only one point (or only one area) of the object. In order for determining the depth map, lights typically need to be “shot” towards different points on the object (for example in a scanline fashion) to determining distances of those points on the object. This can be inefficient and time consuming. In some other approaches that use TOF detector array to achieve 3D image, the performance is affected by the background light strength and the target surface reflection.
Another known method for distance measuring is triangulation method that projects a narrow band of structured light onto a three-dimensionally shaped surface. The light projection can produce lines of illumination that appears distorted from other perspectives than point of the projection, and can be used for an exact geometric reconstruction of the surface shape (light section). Under this method, light patterns can be generated by passing light through a digital spatial light modulator, and depth cues can be obtained from the observed stripe patterns. The displacement of any single stripe can directly be converted into 3D coordinates. For this purpose, the individual stripe has to be identified and analyzed. However, analyzing the stripes strongly relies on the relative positions of the camera. This limitation is not acceptable in some situations that need very tiny package (hardware) for measuring a distance of an object, such as fingerprint detection in a smartphone.
Therefore, there is a need for an improved measuring method for determining a distance of an object that is efficient and easy to implement.